unit VisualPlugin;

interface

uses
  {vcl:} Windows, Messages, SysUtils, Variants, Classes, Graphics, 
Controls, Forms, Dialogs, StdCtrls,
  {Hydra:} uHYVisualPlugin, uHYIntf, uHYPluginControlsRepository, ActnList,
  Buttons, uROClient, uROIndyTCPChannel, uROIndyHTTPChannel,
  uRORemoteService, uROSOAPMessage, uROBinMessage;

type
  TNewVisualPlugin = class(THYVisualPlugin)
    ActionList: TActionList;
    HYPluginControlsRepository: THYPluginControlsRepository;
    BitBtn1: TBitBtn;
    ROBinMessage: TROBinMessage;
    ROSOAPMessage: TROSOAPMessage;
    RORemoteService: TRORemoteService;
    ROIndyHTTPChannel: TROIndyHTTPChannel;
    procedure BitBtn1Click(Sender: TObject);
  private
  protected
  public
  end;

implementation

uses
  {Hydra:} uHYPluginFactories, EquipmentService_Intf;

{$R *.dfm}

procedure Create_NewVisualPlugin(out anInstance: IInterface);
begin
  anInstance := TNewVisualPlugin.Create(NIL);
end;

resourcestring
  sDescription = '';

const
  sRequiredPrivilege = '';
  sUserData = '';

procedure TNewVisualPlugin.BitBtn1Click(Sender: TObject);
var
  eqa: TEquipmentArray;
  I: Integer;
begin
  eqa:= (RORemoteService as IEquipmentService).SelectEquipment('');
  for I:= 0 to Pred(eqa.Count) do
    ShowMessage(eqa[I].OID);
end;

initialization
  THYPluginFactory.Create(HInstance, 'NewVisualPlugin', Create_NewVisualPlugin, TNewVisualPlugin,
                          1, 0, sRequiredPrivilege, sDescription, sUserData);

end.
